<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
	<link rel="stylesheet" href="../css/mui.min.css">
	<link rel="stylesheet" type="text/css" href="../css/youyi.css"/>
	<link rel="stylesheet" type="text/css" href="../css/environmental.css"/>
    <title>环保资讯</title>
   <style>
		html,
		body {
			background-color: #efeff4;
		}
		.mui-bar~.mui-content .mui-fullscreen {
			top: 44px;
			height: auto;
		}
		.mui-pull-top-tips {
			position: absolute;
			top: -20px;
			left: 50%;
			margin-left: -25px;
			width: 40px;
			height: 40px;
			border-radius: 100%;
			z-index: 1;
		}
		.mui-bar~.mui-pull-top-tips {
			top: 86px;
		}
		.mui-pull-top-wrapper {
			width: 42px;
			height: 42px;
			display: block;
			text-align: center;
			background-color: #efeff4;
			border: 1px solid #ddd;
			border-radius: 25px;
			background-clip: padding-box;
			box-shadow: 0 4px 10px #bbb;
			overflow: hidden;
		}
		.mui-pull-top-tips.mui-transitioning {
			-webkit-transition-duration: 200ms;
			transition-duration: 200ms;
		}
		.mui-pull-top-tips .mui-pull-loading {
			/*-webkit-backface-visibility: hidden;
			-webkit-transition-duration: 400ms;
			transition-duration: 400ms;*/
			
			margin: 0;
		}
		.mui-pull-top-wrapper .mui-icon,
		.mui-pull-top-wrapper .mui-spinner {
			margin-top: 7px;
		}
		.mui-pull-top-wrapper .mui-icon.mui-reverse {
			/*-webkit-transform: rotate(180deg) translateZ(0);*/
		}
		.mui-pull-bottom-tips {
			text-align: center;
			background-color: #efeff4;
			font-size: 15px;
			line-height: 40px;
			color: #777;
		}
		.mui-pull-top-canvas {
			overflow: hidden;
			background-color: #fafafa;
			border-radius: 40px;
			box-shadow: 0 4px 10px #bbb;
			width: 40px;
			height: 40px;
			margin: 0 auto;
		}
		.mui-pull-top-canvas canvas {
			width: 40px;
		}
		.mui-slider-indicator.mui-segmented-control {
			background-color: #efeff4;
		}
	</style>	
</head>
<body>
	<header class="mui-bar mui-bar-nav top_nav">
		<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left detail_left"></a>
		<h1 id="title" class="mui-title">环保资讯</h1>
		<!--<a id="info" class="mui-icon iconfont icon-caidan mui-pull-right"></a>-->
	</header>
	<div class="mui-content">
			<div id="slider" class="mui-slider mui-fullscreen envir_contents">
				<div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted envi_ocnsult_nav">
					<a class="mui-control-item mui-active" href="#item1mobile">
						正在热抢
					</a>
					<a class="mui-control-item" href="#item2mobile">
						环保工程
					</a>
					<a class="mui-control-item" href="#item3mobile">
						环境监测
					</a>
				</div>
				<div class="mui-slider-group">
					<div id="item1mobile" class="mui-slider-item mui-control-content mui-active">
						<div id="scroll1" class="mui-scroll-wrapper">
							<div class="mui-scroll env_info_list">
								<ul class="mui-table-view">
									<li class="mui-table-view-cell mui-media">
										<a href="information_details.html">
											<img class="mui-media-object mui-pull-left" src="../images/index/banner@2x.png">
											<div class="mui-media-body">
												<h3 class="mui-ellipsis item_list_head">环保部发函中止贵南高铁环评审环保部发函中止贵南高铁环评审</h3>
												<p class="mui-ellipsis-2">能和心爱的人一起睡觉，是件幸福的事情；可是，打呼噜怎么办？</p>
												<p class="mui-ellipsis"><time pubdate="true">2016/06/02</time> <span class="mui-pull-right">优蚁新闻</span></p>
											</div>
										</a>
									</li>
									<li class="mui-table-view-cell mui-media">
										<a href="information_details.html">
											<img class="mui-media-object mui-pull-left" src="../images/index/banner@2x.png">
											<div class="mui-media-body">
												<h3 class="mui-ellipsis item_list_head">环保部发函中止贵南高铁环评审环保部发函中止贵南高铁环评审</h3>
												<p class="mui-ellipsis-2">能和心爱的人一起睡觉，是件幸福的事情；可是，打呼噜怎么办？</p>
												<p class="mui-ellipsis"><time pubdate="true">2016/06/02</time> <span class="mui-pull-right">优蚁新闻</span></p>
											</div>
										</a>
									</li>
									<li class="mui-table-view-cell mui-media">
										<a href="information_details.html">
											<img class="mui-media-object mui-pull-left" src="../images/index/banner@2x.png">
											<div class="mui-media-body">
												<h3 class="mui-ellipsis item_list_head">环保部发函中止贵南高铁环评审环保部发函中止贵南高铁环评审</h3>
												<p class="mui-ellipsis-2">能和心爱的人一起睡觉，是件幸福的事情；可是，打呼噜怎么办？</p>
												<p class="mui-ellipsis"><time pubdate="true">2016/06/02</time> <span class="mui-pull-right">优蚁新闻</span></p>
											</div>
										</a>
									</li>
								</ul>
							</div>
						</div>
					</div>
					<div id="item2mobile" class="mui-slider-item mui-control-content">
						<div class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<ul class="mui-table-view">
									<li class="mui-table-view-cell">
										第2个选项卡子项-1
									</li>									
								</ul>
							</div>
						</div>
					</div>
					<div id="item3mobile" class="mui-slider-item mui-control-content">
						<div class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<ul class="mui-table-view">
									<li class="mui-table-view-cell">
										第3个选项卡子项-1
									</li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<script src="../js/mui.min.js"></script>
		<script src="../js/mui.pullToRefresh.js"></script>
		<script src="../js/mui.pullToRefresh.material.js"></script>
		<script>
			mui.init();
			(function($) {
				//阻尼系数
				var deceleration = mui.os.ios?0.003:0.0009;
				$('.mui-scroll-wrapper').scroll({
					bounce: false,
					indicators: true, //是否显示滚动条
					deceleration:deceleration
				});
				$.ready(function() {
					//循环初始化所有下拉刷新，上拉加载。
					$.each(document.querySelectorAll('.mui-slider-group .mui-scroll'), function(index, pullRefreshEl) {
						$(pullRefreshEl).pullToRefresh({
							down: {
								callback: function() {
									var self = this;
									setTimeout(function() {
										var ul = self.element.querySelector('.mui-table-view');
										ul.insertBefore(createFragment(ul, index, 2, true), ul.firstChild);
										self.endPullDownToRefresh();
									}, 1000);
								}
							},
							up: {
								callback: function() {
									var self = this;
									setTimeout(function() {
										var ul = self.element.querySelector('.mui-table-view');
										ul.appendChild(createFragment(ul, index,3));
										self.endPullUpToRefresh();
									}, 1000);
								}
							}
						});
					});
					var createFragment = function(ul, index, count, reverse) {
						var length = ul.querySelectorAll('li').length;
						var fragment = document.createDocumentFragment();
						var li;
						for (var i = 0; i < count; i++) {
							li = document.createElement('li');
							li.className = 'mui-table-view-cell mui-media';
							var liHTML='<a href="javascript:;">';
								liHTML +='<img class="mui-media-object mui-pull-left" src="../images/index/banner@2x.png">';
								liHTML +='<div class="mui-media-body">';
								liHTML +='<h3 class="mui-ellipsis item_list_head">' + (index + 1) + '环保部发函中止贵南高铁环评审环保部发函中止贵南高铁环评审</h3>';
								liHTML +='<p class="mui-ellipsis-2">能和心爱的人一起睡觉，是件幸福的事情；可是，打呼噜怎么办？</p>';
								liHTML +='<p class="mui-ellipsis"><time pubdate="true">2016/06/02</time> <span class="mui-pull-right">优蚁新闻</span></p>';
								liHTML +='</div>';
								liHTML +='</a>';
							li.innerHTML = liHTML;
							fragment.appendChild(li);
						}
						return fragment;
					};
				});
			})(mui);
		</script>
	</body>

</html>